const express = require('express');
const {
    httpGetAllLaunches,
    httpAddNewLaunch,
    httpAbortLaunch,
} = require('./launches.controller');

//创建launchesRouter路由器实例
const launchesRouter = express.Router();

//为launchesRouter路由器实例添加GET请求处理方法
launchesRouter.get('/', httpGetAllLaunches);

//为launchesRouter路由器实例添加POST请求处理方法
launchesRouter.post('/', httpAddNewLaunch);

//为launchesRouter路由器实例添加DELETE请求处理方法
launchesRouter.delete('/:id', httpAbortLaunch);

module.exports = launchesRouter;